package com.smart.member.common.reqeust;

import com.smart.member.common.utils.MemberUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Pattern;

@Data
@Validated
@ApiModel("会员请求参数类")
public class MemberRequestParams {
    @ApiModelProperty("手机号")
    @Pattern(regexp = MemberUtils.CONSTANT_REGEXP_PHONE)
    private String phone;
    @ApiModelProperty("验证码")
    private String code;
    /**
     * 会员ID
     */

    @ApiModelProperty("会员")
    private Long memberId;
    /**
     * 邮箱
     */
    @ApiModelProperty("邮箱")
    @Pattern(regexp = MemberUtils.CONSTANT_REGEXP_EMAIL, message = "邮箱格式错误")
    private String email;
    @ApiModelProperty("密码")
    @Pattern(regexp = MemberUtils.CONSTANT_REGEXP_PASSWORD, message = "密码必须是字母开头,长度不超过18")
    private String password;
    /**
     * 注册类型
     */
    @ApiModelProperty("注册类型:  1.邮箱注册 2.手机注册")
    private String registerType;
}
